import axios from './index'

// 后台用户登录
export const login = (param) => {
  return axios.httpRequest({
    url: '/login/toLogin.do?byPhone=true',
    method: 'post',
    data: param
  })
}

export const getCode = (param) => {
  return axios.httpRequest({
    url: '/code/generateCode.do',
    method: 'get',
    params: param
  })
}

export const getUserDetails = (params) => {
  return axios.getRequest({
    url: '/user/queryUserDetails.do',
    method: 'get',
    params: params
  })
}

export const modifyUserInfo = (params) => {
  return axios.httpRequest({
    url: '/user/modifyUserInfo.do',
    method: 'post',
    data: params
  })
}
